<template>
  <div>
      <el-dialog
      title="数据传递提示"
      :visible.sync="dialogVisible"
      width="30%">
      <span>这是一段信息</span>
      <el-input v-model="form.name"></el-input>
      <p>{{form.name}}</p>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
      </span>
    </el-dialog>

  </div>
</template>
<script>
export default {
  props:{
      form:{},
      dialogVisible1:Boolean
  },
  data () {
    return {
      // dialogVisible:false,
    }
  },
  computed: {
    dialogVisible:{
      get() {
      return this.dialogVisible1
    },
    // setter
      set (newValue) {
        console.log('111',newValue)
          this.$emit('update:dialogVisible1', newValue)
      }
    }
  },
  created () {
    console.dir(this.dialogVisible)
    this.$set(this.form, 'name');
  },
  methods: {

  }
}
</script>

